package com.ow.dva.module.permission.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ow.dva.module.base.entity.base.BaseEntity;
import java.io.Serializable;
import java.util.List;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 权限表
 * </p>
 *
 * @author 高祥
 * @since 2020-01-09
 * @version V1.0
 */
@TableName("dva_permission")
@ApiModel(value="Permission对象", description="权限表")
public class Permission extends BaseEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "权限ID")
    private String id;

    @ApiModelProperty(value = "权限名称")
    private String name;

    @ApiModelProperty(value = "权限简介")
    private String intro;

    @ApiModelProperty(value = "父级权限")
    private String parentId;

    @ApiModelProperty(value = "权限类型")
    private Integer type;

    @ApiModelProperty(value = "权限跳转")
    private String url;

    @ApiModelProperty(value = "权限排序")
    private Integer sort;

    @ApiModelProperty(value = "权限图标")
    private String icon;

    @ApiModelProperty(value = "权限标识，一般根据url转换")
    private String shiro;

    @ApiModelProperty(value = "参数 例：&page=1&size=10")
    private String param;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String dataJsTree;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Permission parent;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private Integer childCount;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private String roleId;

    @ApiModelProperty(hidden = true)
    @TableField(exist = false)
    private List<Permission> permissions;

    public String getDataJsTree() {
        return dataJsTree;
    }

    public void setDataJsTree(String dataJsTree) {
        this.dataJsTree = dataJsTree;
    }

    public Permission getParent() {
        return parent;
    }

    public Integer getChildCount() {
        return childCount;
    }

    public void setChildCount(Integer childCount) {
        this.childCount = childCount;
    }

    public void setParent(Permission parent) {
        this.parent = parent;
    }

    public String getRoleId() {
        return roleId;
    }

    public void setRoleId(String roleId) {
        this.roleId = roleId;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getIntro() {
        return intro;
    }

    public void setIntro(String intro) {
        this.intro = intro;
    }
    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }
    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }
    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }
    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }
    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }
    public String getShiro() {
        return shiro;
    }

    public void setShiro(String shiro) {
        this.shiro = shiro;
    }
    public String getParam() {
        return param;
    }

    public void setParam(String param) {
        this.param = param;
    }

    public List<Permission> getPermissions() {
        return permissions;
    }

    public void setPermissions(List<Permission> permissions) {
        this.permissions = permissions;
    }

    @Override
    public String toString() {
        return "Permission{" +
            "id=" + id +
            ", name=" + name +
            ", intro=" + intro +
            ", parentId=" + parentId +
            ", type=" + type +
            ", url=" + url +
            ", sort=" + sort +
            ", icon=" + icon +
            ", shiro=" + shiro +
            ", param=" + param +
        "}";
    }
}
